@import '../_theme.less';

.set-arrow(@direction, @arrowSize: 1rem, @borderColor: @divider-color-normal, @borderWidth: 2rpx) {
  content: ' ';
  display: inline-block;
  width: @arrowSize;
  height: @arrowSize;
  border-top: @borderWidth solid @borderColor;
  border-right: @borderWidth solid @borderColor;
  transform: rotate(0);
  box-sizing: border-box;

  .arrow-direction(@direction);
}
.arrow-direction(@direction) when(@direction = up) {
  transform: rotate(-45deg) translateX(50%);
}
.arrow-direction(@direction) when(@direction = right) {
  transform: rotate(45deg);
}
.arrow-direction(@direction) when(@direction = down) {
  transform: rotate(135deg);
}
.arrow-direction(@direction) when(@direction = left) {
  transform: rotate(-135deg) translateY(50%);
}
